package com.study.example.gameserver.module.ranklist.entity;

import com.google.common.base.Objects;
import java.io.Serializable;

public class PlayerRankId implements Serializable {
    private Long playerId;
    private Integer rankType;

    public PlayerRankId() {
    }

    public PlayerRankId(Long playerId, Integer rankType) {
        this.playerId = playerId;
        this.rankType = rankType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PlayerRankId that = (PlayerRankId) o;
        return Objects.equal(playerId, that.playerId) && Objects.equal(rankType, that.rankType);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(playerId, rankType);
    }

    public Long getPlayerId() {
        return playerId;
    }

    public Integer getRankType() {
        return rankType;
    }
}
